#ifndef __WIFI_H__
#define __WIFI_H__

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"

#include "lwip/err.h"
#include "lwip/sys.h"

#include "ymodem.h"
#include "common.h"

#include "mqtt.h"
// extern const char *TAG;

// extern const char *DOWNLOAD_URL; // 替换为实际下载URL

// extern int s_retry_num;

 

#define EXAMPLE_ESP_WIFI_SSID "WiFi-bing"
#define EXAMPLE_ESP_WIFI_PASS "Zhang1994"
#define EXAMPLE_ESP_MAXIMUM_RETRY 10

 

#define ESP_WIFI_SAE_MODE WPA3_SAE_PWE_BOTH

#define ESP_WIFI_SCAN_AUTH_MODE_THRESHOLD WIFI_AUTH_WPA2_PSK

static EventGroupHandle_t s_wifi_event_group;

#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1

 

void wifi_init_sta();

void event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);

 

#endif
